<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
	<link href="<%=request.getContextPath() %>/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath() %>/static/css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath() %>/static/css/jumbotron.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="<%=request.getContextPath()%>/static/js/html5shiv.min.js"></script>
      <script src="<%=request.getContextPath()%>/static/js/respond.min.js"></script>
    <![endif]-->
<title>订单详情</title>
<style type="text/css">
<!--
.STYLE7 {color: #FFFFFF}
-->
</style>
<style type="text/css">
<!--
.STYLE2 {
	font-family: "华文隶书";
	color: #666666;
}
-->
	.trheader
	{ 
	 border-top-style:outset;
	 border-top-color:#CCCCCC;
	 border-left-style:outset;
	 border-left-color:#CCCCCC;
	 border-right-style:outset;
	 border-right-color:#CCCCCC;
	 }
	.tritem
	{
	border-left-style:outset;
	border-right-style:outset;
	border-left-color:#CCCCCC;
	border-right-color:#CCCCCC;
	}
	.trfoot
	{
	 border-bottom-style:outset;
	 border-bottom-color:#CCCCCC;
	 border-left-style:outset;
	 border-left-color:#CCCCCC;
	 border-right-style:outset;
	 border-right-color:#CCCCCC;
	}
</style>
</head>

<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="<%=request.getContextPath()%>/">本草纲目网</a>
        </div>
        
        <c:if test="${user eq null }">
        <div id="navbar" class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" method="post" action="<%=request.getContextPath()%>/Account/Login">
            <input type="hidden" name="action" value="login" />
            <div class="form-group">
              <input type="text" placeholder="账户" name="username" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" placeholder="密码" name="password" class="form-control">
            </div>
            <button type="submit" class="btn btn-success">立即登陆</button>
            <a class="btn btn-info" href="<%=request.getContextPath() %>/Account/Register">马上注册</a>
          </form>
        </div><!--/.navbar-collapse -->
		</c:if>
		<c:if test="${user ne null }">
		<div id="navbar" class="navbar-collapse collapse">
		  <ul class="nav navbar-nav navbar-right">
		    <li><a>欢迎您，<b>${fn:escapeXml(user.realName) }</b>！</a></li>
		    <li><a href="<%=request.getContextPath() %>/Order/ShowMyOrders">我的订单</a></li>
		    <li><a href="<%=request.getContextPath() %>/Cart/ShowMyCart">我的购物车</a></li>
		    <li><a href="<%=request.getContextPath() %>/Account/Logout">注销</a></li>
		  </ul>
  		</div>
		</c:if>

      </div>
    </nav>
    

<div class="container">

  <div class="row" style="text-align:left ;font-size:66px;">
    <span class="STYLE2">本草纲目<span style="font-size:38px;">网</span></span> 
  </div>
   <div class="row" style="font-size:16px;">
     <ol class="breadcrumb">
      <li><a href="<%=request.getContextPath() %>/">首页</a></li>
      <li><a href="ShowMyOrders">我的订单</a></li>
      <li class="active">订单详情</li>
    </ol>
  </div>

  <div class="row">
    <div class="col-xs-12">
    	<table class="table table-hover">
    		<tr class="trheader success">
    		<td>
        		<label>订单信息</label>
        	</td>
    		</tr>
   
            <tr class="tritem ">
            <td>
            	<label>订单编号:${order.orderInfo.id }</label>
            </td>
            </tr>
    		<tr class="tritem ">
            <td>
            	<label>订单状态:${fn:escapeXml(order.orderInfo.state.friendlyName) }</label>
            </td>
            </tr>
          <tr class="trfoot ">
            <td>
            	<label>创建时间:${fn:escapeXml(order.orderInfo.formattedCreatedDateTime) }</label>
            </td>
          </tr>
      </table>    
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12">         
      <table class="table table-hover">
		<tr class="trheader info">
		  <td class="info">商品名</td>
		  <td class="info">数量</td>
		  <td class="info">单价</td>
		  <td class="info">总价</td>
		</tr>   
		<c:forEach var="item" items="${order.goods}">
		<tr class="tritem">
		      <td>${fn:escapeXml(item.goodItem.name) }</td>
		      <td>${fn:escapeXml(item.quantity) }</td>
		      <td>${fn:escapeXml(item.transactionPrice) }元</td>
		      <td>${fn:escapeXml(item.totalPrice) }元</td>
		</tr>
		</c:forEach>
		<tr class="trfoot">
		  <td colspan="3" style="text-align:right; color:#FF3300" >
		 <b>订单总额:${fn:escapeXml(order.orderInfo.transactionPrice) }元</b>
		  </td>
		  <td>
		  </td>
		</tr>	   
      </table>
    </div>
  </div>
  
  <div class="row">
    <div class="col-xs-12">         
      <table class="table table-hover">
		<tr class="trheader warning">
		  <td class="info">用户信息</td>
		</tr>
		<tr class="tritem">
		  <td>姓名：${fn:escapeXml(user.realName) }</td>
		</tr>
		<tr class="tritem">
		  <td>联系电话：${fn:escapeXml(user.phoneNumber) }</td>
		</tr>
		<tr class="trfoot">
		  <td>地址：${fn:escapeXml(user.address) }</td>
		</tr>
      </table>
    </div>
  </div>

  <div class="row" style="text-align:center;">
    <a class="btn btn-lg btn-success" href="http://www.dashangcloud.com/sh/878995" onclick="alert('网站不支持支付功能！不过您可以给辛苦的开发者打赏一下！\n  (๑╹∀╹๑)   谢谢哦！');">立刻支付</a>
  </div>
  
      <div style="margin-top:20px;"></div>
      
      <footer style="padding-top:19px;color:#777;border-top:1px solid #e5e5e5">
        <p>&copy; 2016 中国药科大学理学院信息管理与信息系统13480班第3组</p>
      </footer>
  
</div>

<script src="<%=request.getContextPath() %>/static/js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="<%=request.getContextPath() %>/static/js/bootstrap.min.js"></script>

</body>
</html>